package com.heima.article.job;

import com.heima.article.service.IHotArticleService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @Author 请不要叫我高司令
 * @Date 2022/4/21 19:35
 * @Version 1.0
 */

@Service
public class HotArticleJob {


    @Autowired
    private IHotArticleService hotArticleService;

    /**
     * 热点文章计算
     */
    @XxlJob("computeHotArticleJob")
    public ReturnT<String> computeHotArticleJob(String param) throws Exception {
        System.out.println("热点文章计算服务开始执行...");
        hotArticleService.compute();
        return ReturnT.SUCCESS;
    }

}
